package chapter11

import scala.collection.mutable.ListBuffer

/**
  * @Copyright: Shanghai Definesys Company.All rights reserved.
  * @Description:
  * @author: chuhaitao
  * @since: 2019/1/13 19:16
  * @history:
  *          1.2019/1/13 created by chuhaitao
  */
object ListBufferDemo {


  def main(args: Array[String]): Unit = {

    var listBuff01 = ListBuffer[Int]()
    var listBuff02 = ListBuffer[Int](1, 2, 3)
    //增加元素

    listBuff01.append(12)
    listBuff01 += 14
    //打散了放入到listBuff01中
    listBuff01 ++= listBuff02

    println("-----"+listBuff01)

    //删除
    listBuff01.remove(0, 1)


    println(listBuff01)


  }
}
